package com.atguigu.day08.bean.test07;

public class Rectangle {
    private double length;
    private double width;

    public double getLength() {
        return length;
    }

    public void setLength(double length) {
        this.length = length;
    }

    public double getWidth() {
        return width;
    }

    public void setWidth(double width) {
        this.width = width;
    }

    public double getArea() {
        return length * width;
    }

    public double getPerimeter() {
        return 2 * (length + width);
    }

    public void getInfo() {
        System.out.println("长:" + length + ",宽:" + width + ",面积:" + getArea() + ",周长:" + getPerimeter());
    }
}
